package kite.springcloud.common.stream;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

/**
 * Processor接口既定义输入通道又定义了输出通道
 *
 * @author houxiurong
 * @date 2020/5/9
 */
public interface ShopChannelProcess {
    /**
     * 发消订阅的通道名称
     */
    String SHOP_TOPIC_OUTPUT = "shop_output";


    /**
     * 发消订阅的通道名称
     */
    String SHOP_TOPIC_INPUT = "shop_input";

    /**
     * 发消息的通道
     *
     * @return MessageChannel
     */
    @Output(SHOP_TOPIC_OUTPUT)
    MessageChannel sendShopMessage();

    /**
     * 收消息的通道
     *
     * @return SubscribableChannel
     */
    @Input(SHOP_TOPIC_INPUT)
    SubscribableChannel receiveShopMessage();

}
